Skip to main content

General WSS information

Upcoming change: compression required from December 10, 2026

Starting December 10, 2026, 08:00 (UTC) (16:00 UTC+8), the public WebSocket market data endpoint (wss://stream.xt.com/public) will only accept connections that negotiate permessage-deflate compression (RFC 7692). Connections without compression will be rejected.

  • Compression is already supported now. Please complete the change and test it before the cutoff.
  • Message content and format are unchanged. Private streams and REST APIs are not affected.
  • To check: the handshake response should include Sec-WebSocket-Extensions: permessage-deflate.
  • Some libraries do not support compression (for example Python websocket-client). Use websockets or aiohttp (compress=15) instead.

Base Address​

wss://stream.xt.com/public


Request Headers​

Request Header​

Sec-WebSocket-Extensions: permessage-deflate (required from December 10, 2026)


Python
# Minimal Python example (websockets, compression enabled by default)
# pip install websockets
import asyncio, websockets

async def main():
async with websockets.connect("wss://stream.xt.com/public", compression="deflate") as ws:
print("Connected to XT public WSS")

asyncio.run(main())
Response
{
"rc": 0,
"mc": "SUCCESS",
"ma": [],
"result": {}
}